<%if @category %>
  <ul id="posts-list" class="widget widget-full group">
    <li>
      <h3><%=  @category.name%></h3>
      <%if @posts.length > 0%>
        <ul>
          <%@posts.each do |p|%>
            <li>
              <%=link_to p.title,p,:class=>"entry-title"%>
              <span class="post-date"><%=p.created_at.strftime("%y-%m-%d")%></span>
            </li>
          <%end%>
        </ul>
        <%= will_paginate @posts,:previous_label=>"上一页",:next_label=>"下一页",:class=>"apple_pagination" %>
      <%else%>
        暂无文章
      <%end%>
    </li>
  </ul>
<%  end %>